package com.snow.useviewdemo;

import android.os.Bundle;
import android.view.View;

import com.snow.common.base.BaseBasesActivity;
import com.snow.useviewdemo.gradien.GradienTextView;
import com.snow.useviewdemo.view.MoreLineTextView;
import com.snow.useviewdemo.view.SongTextView;

import butterknife.BindView;
import butterknife.OnClick;
import gradient.mylibrary.Orientation;

/**
 * author : zyt
 * e-mail : 632105276@qq.com
 * date   : 2019/5/13
 * desc   :
 */
public class TextMoveActivity extends BaseBasesActivity {
    @BindView(R.id.song_tv)
    SongTextView songTv;
    @BindView(R.id.more_line_tv)
    MoreLineTextView moreLineTv;
    @BindView(R.id.gradienTextView)
    GradienTextView gradienTextView;
    private String msg;

    @Override
    protected int getContentViewId() {
        return R.layout.act_text_move;
    }

    @Override
    protected void initView() {
        msg = "朝辞白帝彩云间，千里江陵一日还。\n" +
                "两岸猿声啼不住，轻舟已过万重山。";
        gradienTextView.setText(msg);
    }

    @OnClick({R.id.btn_01, R.id.btn_02})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.btn_01:
                break;
            case R.id.btn_02:
                gradienTextView.start(Orientation.LEFT_TO_RIGHT, 2000);
                break;
        }
    }
}
